package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

public class Demo07 {
    public static void main(String[] args) {
        try(InputStream inputStream = new FileInputStream("D:/test.txt")) {
            byte[] arr = new byte[1024];
            int n = inputStream.read(arr);
            for (int i = 0; i < n; i++) {
                System.out.printf("%x\n", arr[i]);
            }
        }catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
